home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / WORDMISC / MICRODOC.LZH / EMACS.RC < prev    next >
Text File  |  1987-11-04  |  4KB  |  187 lines

  1. ;    EMACS.RC:    Standard micro Startup program
  2. ;            for MicroEMACS 3.9d and above
  3. ;            (C)opyright 1987 by Daniel M Lawrence
  4. ;            Last Update: 10/20/87
  5.  
  6. set $discmd FALSE
  7. write-message "[Setting up....]"
  8.  
  9. ; If you screen "SNOWS", uncomment this line
  10. ;    set $flicker "TRUE"
  11.  
  12. ; To use an IBM-PC EGA card, uncomment the following line
  13. ;    set $sres "EGA"
  14.  
  15. ;    ***** Rebind the Function key group
  16.  
  17. bind-to-key search-forward        FN;
  18. bind-to-key search-reverse        FN<
  19. bind-to-key hunt-forward        FN=
  20. bind-to-key hunt-backward        FN>
  21. bind-to-key execute-macro-1        FN?
  22. bind-to-key execute-macro-2        FN@
  23. bind-to-key next-window            FNA
  24. bind-to-key execute-macro-3        FNB
  25. bind-to-key save-file            FNC
  26. bind-to-key exit-emacs            FND
  27.  
  28. bind-to-key execute-macro-10        FNT
  29. bind-to-key execute-macro-11        FNU
  30. bind-to-key execute-macro-12        FNV
  31. bind-to-key execute-macro-13        FNW
  32. bind-to-key execute-macro-14        FNX
  33. bind-to-key execute-macro-15        FNY
  34. bind-to-key execute-macro-16        FNZ
  35. bind-to-key execute-macro-17        FN[
  36. bind-to-key execute-macro-18        FN\
  37. bind-to-key execute-macro-19        FN]
  38.  
  39. ;    Set Default Global modes
  40.  
  41. add-global-mode "blue"
  42. ;bind-to-key meta-prefix `
  43.  
  44. ;    Toggle function key window display
  45.  
  46. 1    store-macro
  47.     !if %rcfkeys
  48.         !goto rcfoff
  49.     !endif
  50.  
  51. ;    toggle function key window on
  52.     save-window
  53.     1 next-window
  54.     !if &sequal $cbufname "emacs.hlp"
  55.         delete-window
  56.     !endif
  57.     !if ¬ &sequal $cbufname "Function Keys"
  58.         1 split-current-window
  59.         select-buffer "Function Keys"
  60.         add-mode "red"
  61.         !force 5 resize-window
  62.         1 goto-line
  63.     !endif
  64.     set %rcfkeys TRUE
  65.     !force restore-window
  66.     !if &sequal $cbufname "Function Keys"
  67.         next-window
  68.     !endif
  69.     write-message "[Function key window ON]"
  70.     !return
  71.  
  72.     ;Toggle the function key window off
  73. *rcfoff
  74.     save-window
  75.     1 next-window
  76.     !if &sequal "Function Keys" $cbufname
  77.         delete-window
  78.     !endif
  79.     !force restore-window
  80.     write-message "[Function key window OFF]"
  81.     set %rcfkeys FALSE
  82. !endm
  83.  
  84. ;    Toggle HELP file onscreen
  85.  
  86. 2 store-macro
  87.     1 next-window
  88.  
  89.     ;Make sure the function key window isn't up!
  90.     !if &sequal $cbufname "Function Keys"
  91.         delete-window
  92.     !endif
  93.     set %rcfkeys FALSE
  94.  
  95.     ;Bring up page 1
  96.     !if ¬ &seq $cbufname "emacs.hlp"
  97.         help
  98.         8 resize-window
  99.         add-mode "red"
  100.         beginning-of-file
  101.         2 forward-character
  102.     !endif
  103.  
  104. *rchelp
  105.  
  106.     write-message "[PgUp/PgDn] Page    [FN6] EXIT     ^G  Exit leaving page on screen"
  107.     update-screen
  108.     set %rctmp >key
  109.     !if &equ &asc %rctmp 0
  110.         set %rctmp >key
  111.         !if &seq %rctmp I
  112.             beginning-of-line
  113.             !force search-reverse "=>"
  114.             1 redraw-display
  115.             !goto rchelp
  116.         !endif
  117.         !if &seq %rctmp Q
  118.             beginning-of-line
  119.             2 forward-character
  120.             !force search-forward "=>"
  121.             1 redraw-display
  122.             !goto rchelp
  123.         !endif
  124.         !if &seq %rctmp "~@"
  125.             delete-window
  126.             !if &seq %rcfkeys TRUE
  127.                 set %rcfkeys FALSE
  128.                 execute-macro-1
  129.             !endif
  130.             write-message "[Help Exited]"
  131.             !return
  132.         !endif
  133.     !endif
  134.     !if &equ &asc %rctmp 7
  135.         next-window
  136.         set %rcfkeys FALSE
  137.         write-message "[Help Aborted]"
  138.         !return
  139.     !endif
  140.     !goto rchelp
  141. !endm
  142.  
  143. ;    Load a new page
  144.  
  145. 3    store-macro
  146.     !if &seq &find newpage.cmd ""
  147.         write-message "[Can not find NEWPAGE.CMD]"
  148.         !return
  149.     !endif
  150.     execute-file newpage.cmd
  151. !endm
  152.  
  153. ;procedure to clean out the current page (which is nothing right now)
  154.  
  155. store-procedure    clean
  156.     ; nothing by default
  157. !endm
  158.  
  159. ;    Set up auto CMODE
  160.  
  161. 20    store-macro
  162.     set %rctmp &sin $cfname "."
  163.     !if &equ %rctmp 0
  164.         !return
  165.     !endif
  166.     set %rctmp &mid $cfname &add %rctmp 1 5
  167.     !if &or &seq %rctmp "c" &seq %rctmp "h"
  168.         add-mode "cmode"
  169.     !endif
  170. !endm
  171. bind-to-key execute-macro-20    M-FNR
  172.  
  173. ;    bring up the function key window
  174.  
  175.     1 split-current-window
  176.     select-buffer "Function Keys"
  177.     insert-string "f1 search-> f2 <-search █    MicroEMACS:  Text Editor~n"
  178.     insert-string "f3 hunt->   f4 <-hunt   █ ~n"
  179.     insert-string "f5 fkeys    f6 help     █  Available function key Pages include:~n"
  180.     insert-string "f7 nxt wind f8 pg[    ] █    WORD  PROG  BOX~n"
  181.     insert-string "f9 save     f10 exit    █  [use the f8 key to load Pages]~n"
  182.     unmark-buffer
  183.     delete-window
  184.     set %rcfkeys FALSE
  185.     execute-macro-1
  186.     set $discmd TRUE
  187.